<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="map.constants.MapDefaultPropertyValues"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html>
<head>
	<title>Default Map Conifguration Page</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"></meta>
    <meta http-equiv="encoding"     content="utf-8"></meta>

    <!-- <link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap_cerulean.css"/> 
    <link rel="stylesheet" type="text/css" media="screen" href="css/stickyFooter.css"/>
    <link rel="stylesheet" type="text/css" media="screen" href="css/emp-main.css"/>-->
    <c:url value="/admin/map/update/google"   			var="updateGoogleUrl" /> 
    <c:url value="/admin/map/update/general/config"   	var="updateGenConfigUrl" /> 
    
  <%--   <% updateMapEngine(); %> --%>
    
    <style type="text/css">
    	.form-control { border-radius: 10px; }
    	.form_width { width:72%; }
    	.form_row { float: right; width: 70%; }
    	#latLbl { margin-left: 15px; }
    	.coordInput { width:34%; }
    	.lefty { float:left; }
    	.righty { float: right; }
    	#defLon { float:right;margin-right:135px; }
    	.comma { font-size:36px; }
    	#entBaseUrlLbl { margin-left: 15px; }
    	.default_well { min-width:755px; max-width: 755px; }
    	#generalConfig { max-width: 757px; }
    	.form-group { font-size: 14px; }
    	.label { font-size: 14px; }
    	span.ui-icon { padding-right: 20px; display:inline-block;"}
    	.ui-accordian-header { padding-left: 9px; }
    </style>
</head>

<body>
	<div id="generalConfig">
	  <h3>Additional Configuration</h3>
	  	<div class="container" style="padding-left: 0px;">
			<div class="col-lg-6" style="padding-left: 0px;">
				<div class="well default_well">
					<form class="form-horizontal">
						<fieldset>
							<legend>General Configurations</legend>
		
							<div class="form-group" title="Default view location for the map on startup">
								<label id="latLbl" class="control-label" for="defLat">Latitude</label>
								<label class="control-label" for="defLon"  title="Default view location for the map on startup">, Longitude:</label>
								<div class="col-lg-10 form_row">
									<input id="defLat" class="form-control lefty coordInput" type="text" placeholder="Latitude" />
									<span class="comma">,</span>								
									<input id="defLon" class="form-control coordInput" type="text" placeholder="Longitude" />
								</div>
							</div>						
							
							<div class="form-group" title="Configure this to establish a default scale for your map">
								<label class="col-lg-3 control-label" for="defScale">Scale:</label>
								<div class="col-lg-10 form_row">
									<input id="defScale" class="form-control lefty form_width" type="text" placeholder="Scale" />
								</div>
							</div>
								
							<div class="form-group sub-button-group" style="padding-top: 30px;margin-left:0px; position: inherit">
								<button type="button" class="btn btn-success" type="submit" onclick="updateGeneralConfig('${updateGenConfigUrl}')">Save</button>
								<button type="button" class="btn btn-warning" onclick="updateGoogleMapServerConfigurationGUI()">Reset</button>
							</div>
						</fieldset>
					</form>
				</div>
			</div>
		</div>
	</div>	

	<script type='text/javascript' src="js/google-eng-config.js"></script>
	<script type='text/javascript'>
		$(function() {
		    $( "#generalConfig" ).accordion({
		      collapsible: true,
		      active : 'none'
		    });
		  });
	</script>
	<script type="text/javascript">		
		googleEngInit();
		
		<%-- var mapEngineSel =<%="\""+this.mapEngine+"\""%>; --%>
		var mapEngineSel ="google";
		emp.$('#mapEngineSelection').val(mapEngineSel);

		updateSelection(mapEngineSel);
		
		emp.$('#mapEngineSelection').change(function() {
			updateSelection(emp.$(this).val());	
  		});	 				
	</script>
</body>
</html>

<%!
	/* private ProxyConfigService proxySvc = new ProxyConfigService(); 
	private MapConfigJsUtils mapUtils = new MapConfigJsUtils();
	private String mapEngine = "commercialgoogle";
	private ProxyConfigBean proxyConfig = new ProxyConfigBean();
	private String owfLibLoc = MapDefaultPropertyValues.OWF_WIDGET_JS;
	
	
	public void updateMapEngine() {
		this.mapEngine = mapUtils.getMapEngine();
	}	
		
	public boolean isSelected(String val) {
		boolean isSel = false;
		if (val.equals(this.mapEngine)) {
			isSel = true;
		}
		
		return isSel;
	} */	
%>